package com.xiaoshuidi.cloud.module.finance.controller.admin.finance.vo.reconciliation;

import com.xiaoshuidi.cloud.module.finance.controller.admin.finance.vo.flow.FinanceMoneyFlowRespVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

@Schema(description = "管理后台 - 交易流水分页 Response VO")
@Data
@Builder
@AllArgsConstructor
public class FinanceReconciliationPageResult {

    @Schema(description = "总计笔数")
    private Integer totalCount;
    @Schema(description = "总计收笔数")
    private Integer totalIncomeCount;
    @Schema(description = "总计收入金额")
    private BigDecimal totalIncomeAmount;
    @Schema(description = "总计流出笔数")
    private Integer totalPayoutCount;
    @Schema(description = "总计流出金额")
    private BigDecimal totalPayoutAmount;
    @Schema(description = "支付宝收入笔数")
    private Integer totalAlipayCount;
    @Schema(description = "微信收入笔数")
    private Integer totalWeixinCount;

    public FinanceReconciliationPageResult() {
        this.totalCount = 0;
        this.totalIncomeCount = 0;
        this.totalIncomeAmount = BigDecimal.ZERO;
        this.totalPayoutCount = 0;
        this.totalPayoutAmount = BigDecimal.ZERO;
        this.totalAlipayCount = 0;
        this.totalWeixinCount = 0;
    }

    @Schema(description = "数据", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<FinanceMoneyFlowRespVO> list;

    @Schema(description = "总量", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long total;

    public FinanceReconciliationPageResult(List<FinanceMoneyFlowRespVO> list, Long total) {
        this.list = list;
        this.total = total;
    }

    public FinanceReconciliationPageResult(Long total) {
        this.list = new ArrayList<>();
        this.total = total;
    }

}
